import request from '../../../utils/request'

// 查询请假申请列表
export function listLeaveApplication(query) {
    return request({
        url: '/leave/application/list',
        method: 'get',
        params: query
    })
}

// 查询请假申请详细
export function getLeaveApplication(id) {
    return request({
        url: '/leave/application/' + id,
        method: 'get'
    })
}

// 新增请假申请
export function addLeaveApplication(data) {
    return request({
        url: '/leave/application',
        method: 'post',
        data: data
    })
}

// 修改请假申请
export function updateLeaveApplication(data) {
    return request({
        url: '/leave/application',
        method: 'put',
        data: data
    })
}

// 删除请假申请
export function delLeaveApplication(id) {
    return request({
        url: '/leave/application/' + id,
        method: 'delete'
    })
}

// 导出请假申请
export function exportLeaveApplication(query) {
    return request({
        url: '/leave/application/export',
        method: 'get',
        params: query
    })
}


// 修改请假申请
export function submit(data) {
  return request({
    url: '/leave/application/submit',
    method: 'post',
    data: data
  })
}

// 查询待办列表
export function applyList(query) {
  return request({
    url: '/leave/application/applyList',
    method: 'get',
    params: query
  })
}

// 查询待办列表
export function approvalRecordList(query) {
  return request({
    url: '/leave/application/approvalRecordList',
    method: 'get',
    params: query
  })
}
